﻿#pragma once

#include "YBaseMuxer.h"
/// <summary>
/// 解封装器
/// </summary>
class YDemuxer :public YBaseMuxer
{

public:
	/// <summary>
	/// 打开解封装器
	/// </summary>
	/// <param name="url">打开的文件地址（本地路径或网络url）</param>
	/// <returns></returns>
	AVFormatContext* Open(const char* url);

	/// <summary>
	/// 读取一帧数据
	/// </summary>
	/// <param name="pkt">输出数据</param>
	/// <returns></returns>
	bool Read(AVPacket* pkt);
	
	//移动音视频文件的pts
	bool Seek(long long pts, int stream_index);

	YDemuxer();
	~YDemuxer();
};
